home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5852 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.5 KB

  1. Path: access4.digex.net!not-for-mail
  2. From: ell@access4.digex.net (Ell)
  3. Newsgroups: comp.lang.c++
  4. Subject: [Q] Interface vs. Implementation Inheritance
  5. Date: 7 Feb 1996 05:20:25 GMT
  6. Organization: The Universe
  7. Message-ID: <4f9cqp$2gc@news4.digex.net>
  8. NNTP-Posting-Host: access4.digex.net
  9. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  10.  
  11. From news3.digex.net!access1.digex.net!not-for-mail Wed Feb  7 00:04:07 1996
  12. Path: news3.digex.net!access1.digex.net!not-for-mail
  13. From: ell@access1.digex.net (Ell)
  14. Newsgroups: comp.object
  15. Subject: Re: [Q] Interface vs. Implementation Inheritance
  16. Date: 6 Feb 1996 03:40:30 GMT
  17. Organization: The Universe
  18. Lines: 37
  19. Message-ID: <4f6ije$hcg@news4.digex.net>
  20. References: <4etus7$t6f@ixnews2.ix.netcom.com> <qcwraw9vj05.fsf@grasshopper.aud.alcatel.com> <4f6di0$ge7@news4.digex.net>
  21. NNTP-Posting-Host: access1.digex.net
  22. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  23.  
  24. Ell (ell@access1.digex.net) wrote:
  25. : Kevin K. Lewis (lewikk@grasshopper.aud.alcatel.com) wrote:
  26. : : In article <4etus7$t6f@ixnews2.ix.netcom.com> gregz@ix.netcom.com 
  27. : : (Greg Zavertnik) writes:
  28. : : 
  29. : :    Hello,
  30. : : 
  31. : :    I've been hearing about interface vs. implementation inheritance and 
  32. : :    have a few questions about them.
  33. : : [...]
  34. : : 
  35. : : I'm assuming by "interface inheritance", you mean subtyping.  If not,
  36. : : please correct me.
  37. : With respect to C++ public inheritance, think more about
  38. : "substitutability" rather than subtyping, as the C++ FAQ and my article
  39. : "Beauty and Power of C++" advocate.  (The article is in the May 1995 issue
  40. : of Object magazine.  I am Elliott Coates.)  This idea was initially put
  41. : forward by myself in 1990, and extended by contributors to comp.lang.c++. 
  42. : Objects which publically inherit should be substitutable for each other in
  43. : C++.  To do so they should adhere to Bertrand Meyer's open/closed
  44. : principle and Barbara Liskov's substitution principle. 
  45. :
  46. : Elliott
  47.  
  48. Liskov argued for substitution compliance of derived classes in a class
  49. hierarchy (a derived class should be substitutable for its base class). 
  50. In comp.lang.c++, I argued that such substitution is more important than
  51. "is-a" subtyping with respect to public inheritance.  I made the point
  52. that it less important to subtype than it is to achieve run-time
  53. substitution of the parts of a system on both a micro (class) and macro
  54. (subsystem/category) level in a consistent manner.  If the
  55. classes/categories are open/closed and LSP compliant then they should be
  56. consistent for substitution in terms of the logical responsibility
  57. collaboration structure of the program. 
  58.  
  59. Elliott
  60.  
  61.